package com.ruoyi.front_desk.FrontdeskPublicOpinion.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * @author 刘奥旸
 * @version 1.0
 */
@TableName(value = "userinfo")
public class FrontdesktempUserInfo extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 自增长的主键ID */
    private Long id;

    /** 申请的用户名，需唯一 */

    private String username;

    /** 加密存储的用户密码 */

    private String password;

    /** 存储的真实密码 */

    private String rawPassword;

    /** 用户角色，1: 选民, 2: 人大代表, 3: 街工委 */

    private Integer role;

    /** 用户姓名 */

    private String name;

    /** 用户联系信息 */

    private String contactInfo;

    /** 上次登录时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")

    private Date lastLogin;

    /** 父ID，默认为0 */

    private Long parentId;

    /** 用户注册时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")

    private Date createdAt;

    /** 备用的整数字段 */

    private Long spareInt;

    /** 备用的字符串字段 */

    private String spareVarchar;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setUsername(String username)
    {
        this.username = username;
    }

    public String getUsername()
    {
        return username;
    }
    public void setPassword(String password)
    {
        this.password = password;
    }

    public String getPassword()
    {
        return password;
    }
    public void setRawPassword(String rawPassword)
    {
        this.rawPassword = rawPassword;
    }

    public String getRawPassword()
    {
        return rawPassword;
    }
    public void setRole(Integer role)
    {
        this.role = role;
    }

    public Integer getRole()
    {
        return role;
    }
    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }
    public void setContactInfo(String contactInfo)
    {
        this.contactInfo = contactInfo;
    }

    public String getContactInfo()
    {
        return contactInfo;
    }
    public void setLastLogin(Date lastLogin)
    {
        this.lastLogin = lastLogin;
    }

    public Date getLastLogin()
    {
        return lastLogin;
    }
    public void setParentId(Long parentId)
    {
        this.parentId = parentId;
    }

    public Long getParentId()
    {
        return parentId;
    }
    public void setCreatedAt(Date createdAt)
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt()
    {
        return createdAt;
    }
    public void setSpareInt(Long spareInt)
    {
        this.spareInt = spareInt;
    }

    public Long getSpareInt()
    {
        return spareInt;
    }
    public void setSpareVarchar(String spareVarchar)
    {
        this.spareVarchar = spareVarchar;
    }

    public String getSpareVarchar()
    {
        return spareVarchar;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("username", getUsername())
                .append("password", getPassword())
                .append("rawPassword", getRawPassword())
                .append("role", getRole())
                .append("name", getName())
                .append("contactInfo", getContactInfo())
                .append("lastLogin", getLastLogin())
                .append("parentId", getParentId())
                .append("createdAt", getCreatedAt())
                .append("spareInt", getSpareInt())
                .append("spareVarchar", getSpareVarchar())
                .toString();
    }
}
